﻿using System;

namespace YArchitech.Plumbing
{
	public class VPipeSetting
	{
		public bool IsIntegratedPipe { get; set; }

		public bool IsGasPipe { get; set; }

		public bool IsLocateAssist { get; set; }

		public bool IsRelative { get; set; }

		public string LiquidPipeDiameter { get; set; }

		public string GasPipeDiameter { get; set; }

		public double AssistLength { get; set; }

		public double AssistAngle { get; set; }

		public bool IsCustom { get; set; }

		public string CustomNum { get; set; }

		public bool IsAreaNum { get; set; }

		public string AreaNum { get; set; }

		public bool IsBuildingNum { get; set; }

		public string BuildingNum { get; set; }

		public string StartReference { get; set; }

		public string StartOffset { get; set; }

		public string EndReference { get; set; }

		public string EndOffset { get; set; }

		public string TopLevel { get; set; }

		public string BottomLevel { get; set; }

		public string PipeTypeName
		{
			get
			{
				string result = string.Empty;
				if (this.IsIntegratedPipe)
				{
					result = "冷媒管";
				}
				else if (this.IsGasPipe)
				{
					result = "气管";
				}
				else
				{
					result = "液管";
				}
				return result;
			}
		}

		public double PipeDiameterInfo
		{
			get
			{
				double result = 0.0;
				if (this.IsIntegratedPipe)
				{
					result = 50.8;
				}
				else if (this.IsGasPipe)
				{
					double.TryParse(this.GasPipeDiameter, out result);
				}
				else
				{
					double.TryParse(this.LiquidPipeDiameter, out result);
				}
				return result;
			}
		}
	}
}
